const test = () => import(/* webpackChunkName: "test" */'pages/test.vue')
const about = () => import(/* webpackChunkName: "about" */'pages/about.vue')
const home = () => import(/* webpackChunkName: "home" */'pages/home.vue')
const NotFoundComponent = () => import(/* webpackChunkName: "404" */'pages/notFound/notFound')

//component:组件对象
//component:函数（函数返回一个promise promise持有的值是一个组件对象）
export default [
  {
    path:"/test/:id",
    component:test,
    meta:{hideFooter:true},
    //路由独享守卫
    /*beforeEnter: (to, from, next) => {
      console.log("test路由独享守卫")
      next()
    }*/
  },
  {path:"/about",component:about},
  {path:"/home",component:home},
  {path:"/",redirect:"/home"},
  {path: '*', component: NotFoundComponent }
]
